package com.niuniu.rushdorm.exception;

/**
 * @author Meng
 * 2022/11/9
 */

import com.niuniu.rushdorm.util.StatusEnum;

/**
 * 用于保存异常状态信息，并向前端报告
 */
public class ReportedException extends RuntimeException{
    private StatusEnum status;
    private ReportedException(StatusEnum status){
        this.status = status;
    }
    public StatusEnum getStatus(){
        return status;
    }
    public static ReportedException build(StatusEnum status){
        return new ReportedException(status);
    }
}
